<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户登录 - 新闻资讯平台</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">

    <link rel="stylesheet" href="css/login.css">
</head>

<body>
    <div class="container">
        <div class="login-container">
            <div class="login-card">
                <div class="login-header">
                    <div class="brand-icon">
                        <i class="fas fa-newspaper"></i>
                    </div>
                    <h3>新闻资讯平台</h3>
                    <p>请登录您的账户</p>
                </div>

                <!-- 用户类型切换 -->
                <div class="user-type-toggle">
                    <button type="button" class="btn active" id="userBtn">
                        <i class="fas fa-user mr-1"></i> 普通用户
                    </button>
                    <button type="button" class="btn admin" id="adminBtn">
                        <i class="fas fa-user-shield mr-1"></i> 管理员
                    </button>
                </div>

                <form id="loginForm">
                    <div class="form-group">
                        <label for="username">用户名</label>
                        <input type="text" class="form-control" id="username" placeholder="请输入用户名" required>
                    </div>

                    <div class="form-group">
                        <label for="password">密码</label>
                        <input type="password" class="form-control" id="password" placeholder="请输入密码" required>
                    </div>

                    <button type="submit" class="btn btn-primary btn-block" id="loginBtn">
                        登录
                    </button>
                </form>

                <!-- 提示信息 -->
                <div class="info-box" id="userInfo">
                    <h6><i class="fas fa-info-circle mr-1"></i>普通用户登录</h6>
                    <p class="mb-0">请输入您在数据库中注册的普通用户账号和密码</p>
                </div>
                
                <div class="info-box admin" id="adminInfo" style="display: none;">
                    <h6><i class="fas fa-info-circle mr-1"></i>管理员登录</h6>
                    <p class="mb-0">请输入您在数据库中的管理员账号和密码</p>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>

    <script src="js/login.js"></script>
</body>

</html>